#include "map.h"

Map::Map(QString newName, Tile*** newTileArray, int newWidth, int newHeight, QString newWallType) :
    name(newName), tileArray(newTileArray), width(newWidth), height(newHeight), wallType(newWallType) {}

Map::~Map() {
    for(int x = 0; x < width; ++x) {
        for(int y = 0; y < height; ++y) {
            delete tileArray[x][y];
        }
        delete[] tileArray[x];
    }
    delete[] tileArray;
}

QString Map::getName() { return name; }
int Map::getWidth() { return width; }
int Map::getHeight() { return height; }
Tile* Map::getTileAt(int x, int y) { return tileArray[x][y]; }
QString Map::getWallType() { return wallType; }
